package com.hk.wms.wmsprovider9002.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

@RestController
@RefreshScope
public class ProviderController {
    @Value("${server.port}")
    String serverPort;
    @Value("${config.info}")
    String config;
    @Value("${config.info1}")
    String config1;
    @GetMapping("/provider/{id}")
    public String getServerPort(@PathVariable("id") Integer id){
        return serverPort+":"+id+":"+config+":"+config1;
    }
    @GetMapping("/getStr/{id}")
    public String getStr(@PathVariable("id")int id){
        return id+":"+serverPort;

    }
    @GetMapping("/getStr2/{id}")
    public String getStr2(@PathVariable("id")int id){
        return id+":"+serverPort;

    }
}
